home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / tsbat30.zip / test33.bat < prev    next >
DOS Batch File  |  1991-12-07  |  991b  |  29 lines

  1. echo off
  2.  
  3. rem This is a demonstration batch by Prof. Timo Salmi Sat 7-Dec-91
  4.  
  5. rem It shows how to test within a batch files if the MsDos version
  6. rem is 3.3 or later. The reason for this demonstration is that you
  7. rem might wish to have differences in your batch depending on which
  8. rem MsDos version is available. For example the call command was not
  9. rem available until version 3.3.
  10.  
  11. rem If none of the 3.3, 4. or .5 is found then tmpfind.$$$ will be
  12. rem empty.
  13. ver | find "3.3" > tmpfind.$$$
  14. ver | find "4." >> tmpfind.$$$
  15. ver | find "5." >> tmpfind.$$$
  16.  
  17. rem If tmpfind.$$$ is empty (0 bytes) copying it will produce
  18. rem nothing.
  19. copy tmpfind.$$$ tmpfind1.$$$ > nul
  20. del tmpfind.$$$
  21.  
  22. rem We tests whether tmpfind1$$$ exitst. This we are indirectly
  23. rem testing whether 3.3, 4. or .5 was found.
  24. if exist tmpfind1.$$$ echo MsDos version is at least 3.3
  25. if not exist tmpfind1.$$$ echo MsDos version is earlier than 3.3
  26.  
  27. if exist tmpfind1.$$$ del tmpfind1.$$$
  28. echo on
  29.